import { createRouter, createWebHashHistory } from 'vue-router'
import index from '../views'
import home from '../views/pages/home.vue'
import login from '../views/pages/login.vue'
import xueshengList from '@/views/pages/xuesheng/list'
import xueshengDetail from '@/views/pages/xuesheng/formModel'
import xueshengAdd from '@/views/pages/xuesheng/formAdd'
import xueshengRegister from '@/views/pages/xuesheng/register'
import xueshengCenter from '@/views/pages/xuesheng/center'
import jiaoshiList from '@/views/pages/jiaoshi/list'
import jiaoshiDetail from '@/views/pages/jiaoshi/formModel'
import jiaoshiAdd from '@/views/pages/jiaoshi/formAdd'
import kechengleibieList from '@/views/pages/kechengleibie/list'
import kechengleibieDetail from '@/views/pages/kechengleibie/formModel'
import kechengleibieAdd from '@/views/pages/kechengleibie/formAdd'
import kechengziyuanList from '@/views/pages/kechengziyuan/list'
import kechengziyuanDetail from '@/views/pages/kechengziyuan/formModel'
import kechengziyuanAdd from '@/views/pages/kechengziyuan/formAdd'
import kehouzuoyeList from '@/views/pages/kehouzuoye/list'
import kehouzuoyeDetail from '@/views/pages/kehouzuoye/formModel'
import kehouzuoyeAdd from '@/views/pages/kehouzuoye/formAdd'
import shipinjiaoxueList from '@/views/pages/shipinjiaoxue/list'
import shipinjiaoxueDetail from '@/views/pages/shipinjiaoxue/formModel'
import shipinjiaoxueAdd from '@/views/pages/shipinjiaoxue/formAdd'
import kechengqiandaoList from '@/views/pages/kechengqiandao/list'
import kechengqiandaoDetail from '@/views/pages/kechengqiandao/formModel'
import kechengqiandaoAdd from '@/views/pages/kechengqiandao/formAdd'
import newsList from '@/views/pages/news/list'

const routes = [{
		path: '/',
		redirect: '/index/home'
	},
	{
		path: '/index',
		component: index,
		children: [{
			path: 'home',
			component: home
		}
		, {
			path: 'xueshengList',
			component: xueshengList
		}, {
			path: 'xueshengDetail',
			component: xueshengDetail
		}, {
			path: 'xueshengAdd',
			component: xueshengAdd
		}
		, {
			path: 'xueshengCenter',
			component: xueshengCenter
		}
		, {
			path: 'jiaoshiList',
			component: jiaoshiList
		}, {
			path: 'jiaoshiDetail',
			component: jiaoshiDetail
		}, {
			path: 'jiaoshiAdd',
			component: jiaoshiAdd
		}
		, {
			path: 'kechengleibieList',
			component: kechengleibieList
		}, {
			path: 'kechengleibieDetail',
			component: kechengleibieDetail
		}, {
			path: 'kechengleibieAdd',
			component: kechengleibieAdd
		}
		, {
			path: 'kechengziyuanList',
			component: kechengziyuanList
		}, {
			path: 'kechengziyuanDetail',
			component: kechengziyuanDetail
		}, {
			path: 'kechengziyuanAdd',
			component: kechengziyuanAdd
		}
		, {
			path: 'kehouzuoyeList',
			component: kehouzuoyeList
		}, {
			path: 'kehouzuoyeDetail',
			component: kehouzuoyeDetail
		}, {
			path: 'kehouzuoyeAdd',
			component: kehouzuoyeAdd
		}
		, {
			path: 'shipinjiaoxueList',
			component: shipinjiaoxueList
		}, {
			path: 'shipinjiaoxueDetail',
			component: shipinjiaoxueDetail
		}, {
			path: 'shipinjiaoxueAdd',
			component: shipinjiaoxueAdd
		}
		, {
			path: 'kechengqiandaoList',
			component: kechengqiandaoList
		}, {
			path: 'kechengqiandaoDetail',
			component: kechengqiandaoDetail
		}, {
			path: 'kechengqiandaoAdd',
			component: kechengqiandaoAdd
		}
		, {
			path: 'newsList',
			component: newsList
		}
		]
	},
	{
		path: '/login',
		component: login
	}
	,{
		path: '/xueshengRegister',
		component: xueshengRegister
	}
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
